package ooday04;

public class Fish extends Animal implements Swim {
   public Fish(int age,String name,String color){
        super(age,name,color);
    }

    //@Override
    protected void eat() {
        String st=getClass().toString();
        System.out.println(st.substring(getClass().toString().lastIndexOf(".")+1,st.length())+"的动物"+"名字叫"+name+"正在觅食"+age+color);

    }
    public void swim(){
        System.out.println("鱼能摆尾式游泳");
    //    Sequence
    }
    //鱼吐泡泡
    public void spitBubbles(){
        System.out.println("鱼儿吐泡泡");
    }
}
